﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<VTLive.Models.ScheduleViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	AddEpisode
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>AddEpisode</h2>

     
         <%if (Model.episodes.Count() != 0)
      { %>
    <table>
        <tr>
            <th></th>
            <th>
                Episode
            </th>
        </tr>
        
            <%foreach (VTLive.Models.Video v in Model.videos)
              { %>
              <tr>
                <td>
                    <%= Html.ActionLink("Delete From Schedule", "Delete", new {id = v.ID})%>
                </td>
                <td>
                    <%=Html.Encode(v.Name)%>
                </td>
              </tr>
            <%} %>
    </table>
    <% } %>
    
             <%if (Model.suggestions.Count() != 0)
      { %>
    <table>
        <tr>
            <th></th>
            <th>
                Suggestions
            </th>
        </tr>
        
            <%foreach (VTLive.Models.Suggestion s in Model.suggestions)
              { %>
              <tr>
                <td>
                    <%= Html.ActionLink("Add to schedule", "Insert", new { suggestionid = s.ID, scheduleid = Model.episode.ScheduleID })%>
                </td>
                <td>
                    <%=Html.Encode(s.Name)%>
                </td>
              </tr>
            <%} %>
    </table>
    <% } %>

    
      <%Html.RenderPartial("NewVideoForm", Model.video); %>

    
</asp:Content>

